<?php namespace system\database\migrations;
use houdunwang\database\build\Migration;
use houdunwang\database\build\Blueprint;
use houdunwang\database\Schema;
class CreateAlbumTable extends Migration {
    //执行
	public function up() {
		Schema::create( 'album', function ( Blueprint $table ) {
			$table->increments( 'album_id' );
            $table->timestamps();
            $table->string( 'album_title' )->defaults('')->comment('照片标题');
            $table->string( 'album_linkurl' )->defaults('')->comment('照片跳转连接');
            $table->tinyInteger( 'album_orderby' )->defaults(0)->comment('照片排序');
            $table->string( 'album_thumb' )->defaults('')->comment('照片路径');
        });
    }

    //回滚
    public function down() {
        Schema::drop( 'album' );
    }
}